<?php

require_once 'Zend/Amf/Parse/InputStream.php';
require_once 'Zend/Amf/Request/Http.php';
require_once 'Flextrine/Amf/Parse/Amf0/Deserializer.php';

class Flextrine_Amf_Request_Http extends Zend_Amf_Request_Http {

    /**
     * Prepare the AMF InputStream for parsing.
     *
     * @param  string $request
     * @return Zend_Amf_Request
     */
    public function initialize($request) {
        $this->_inputStream  = new Zend_Amf_Parse_InputStream($request);
        $this->_deserializer = new Flextrine_Amf_Parse_Amf0_Deserializer($this->_inputStream);
        $this->readMessage($this->_inputStream);
        return $this;
    }

}
